<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Author: 无言 <allurelove9958@qq.com>
// +----------------------------------------------------------------------
function sp_password($pass,$salt = ''){
	$password = md5(hash('sha256',$pass.$salt));
	return $password;
}
function sp_rand($length = 6){
	$length = intval($length);
	$rand = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123465789';
	$strlen = strlen($rand);
	$return = '';
	while(--$length){
		$index = rand(0,$strlen-1);
		$return .= $rand[$index];
	}
	return $return;
}

